package com.bloveoa.zkkd.service.impl;

import com.bloveoa.zkkd.doman.OutTokenModel;
import com.bloveoa.zkkd.redis.utils.RedisUtil;
import com.bloveoa.zkkd.repository.OutTokenRepository;
import com.bloveoa.zkkd.service.OutTokenService;
import org.springframework.stereotype.Service;

@Service
public class OutTokenServiceImpl  implements OutTokenService{

    private final OutTokenRepository outTokenRepository;

    public OutTokenServiceImpl(OutTokenRepository outTokenRepository) {
        this.outTokenRepository = outTokenRepository;
    }

    @Override
    public OutTokenModel insertOutToken(OutTokenModel tokenModel) {
        return outTokenRepository.save(tokenModel);
    }
    @Override
    public boolean existsByTxHash(String txHash) {
        return outTokenRepository.existsByTxHash(txHash);
    }
}
